using Microsoft.Web.Administration;

namespace LeastPrivilege.CustomBasicAuthentication.Management
{
    public class CustomBasicAuthenticationSection : ConfigurationSection
    {
        public static string SectionName = "system.webServer/security/authentication/customBasicAuthentication";
        
        public bool Enabled
        {
            get { return (bool)base["enabled"]; }
            set { base["enabled"] = value; }
        }
        
        public string Realm
        {
            get { return (string)base["realm"]; }
            set { base["realm"] = value; }
        }
        
        public string ProviderName
        {
            get { return (string)base["providerName"]; }
            set { base["providerName"] = value; }
        }

        public bool CachingEnabled
        {
            get { return (bool)base["cachingEnabled"]; }
            set { base["cachingEnabled"] = value; }
        }

        public int CachingDuration
        {
            get { return (int)base["cachingDuration"]; }
            set { base["cachingDuration"] = value; }
        }
        
        public bool RequireSSL
        {
            get { return (bool)base["requireSSL"]; }
            set { base["requireSSL"] = value; }
        }
    }
}